src_directory	=src/
bin_directory	=bin/
executable		=$(bin_directory)fmaster

.PHONY:		all	build

all	:	prepare		build
	@echo "building all modules"
	
	
build	:$(src_directory)folder_manager.cpp	$(src_directory)delete_command.cpp	$(src_directory)command.cpp	$(src_directory)statistics_command.cpp $(src_directory)resources.cpp
	@echo "compile into binary file"
	g++ -g -llog4cxx  -lsqlite3  -lboost_filesystem -lboost_system	$(src_directory)resources.cpp $(src_directory)folder_manager.cpp  $(src_directory)delete_command.cpp   $(src_directory)command.cpp	 $(src_directory)statistics_command.cpp -o $(executable)
	
clean	:
	@echo "cleaning previous files"
	rm -rf  $(executable)
	rm -rf $(bin_directory)
		
		
test	:
	@echo "testing"
	
testDelete	:
	@echo "test deleting"
	$(executable) --command=delete --tree=./ft	--filter=*.txt

stat	:	build
	@echo "test stat"
	$(executable) --command=stats --tree=./ft	--filter=*.txt
	
	
prepare:
	mkdir -p $(bin_directory)
	